fix misplacement of placeholder text in QLineEdit with RTL content
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Sat, 2 Apr 2022 18:23:38 +0000 (19:23 +0100)
committerDmitry Shachnev <mitya57@debian.org>
Sat, 2 Apr 2022 18:23:38 +0000 (19:23 +0100)
commit77c41f3e8a334f07c7c0a54e8e3ef8250a56445d
tree09188dd46fa3fbdbbd7f9d71b6928a8ca87cbb44
parent9d1833f64f8ea575df3f6f3ce281144b2145e4b7
fix misplacement of placeholder text in QLineEdit with RTL content

Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=dc794f7622bc00f7
Last-Update: 2021-06-16

The placeholder text was rendered in the wrong position after clicking
on the clear button in a QLineEdit with right-to-left content. The
button was still taking up space while it was fading out, so the first
paintEvent rendered the placeholder with space reserved for the clear
button. Once the button gets hidden, no new update was issued, so
garbage was left behind.

Fix this by not giving a fading-out clear button any margin space. The
result of this is that the placeholder text is visible underneath the
fading-out clear button. This is preferable to the placeholder text
being first rendered next to the fading-out clear button, and then
popping to the edge when the clear button is hidden (which would have
been the result of issuing a complete update for the line edit at the
end of the fade-out animation).

Gbp-Pq: Name fix-misplacement-of-placeholder-text-in-QLineEdit.diff
src/widgets/widgets/qlineedit_p.cpp
src/widgets/widgets/qlineedit_p.h